-
Notifications
You must be signed in to change notification settings - Fork 218
Apricot #1660
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Apricot #1660
Conversation
| public struct RgbFunctionCurve { | ||
| [FieldOffset(0x0)] public uint Data; | ||
| // not a fixed size array, not sure how else to handle this? | ||
| [FieldOffset(0x4), FixedSizeArray] internal unsafe fixed byte _keys[0x10]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think what you were looking for was FixedSizeArray2<Pointer<RgbKey>>.
But in this case, with a dynamic sized array, it probably won’t help much.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could do
[FieldOffset(0x4)] public RgbKey* KeyPointer;
public Span<RgbKey> Keys => new Span(KeyPointer, KeyCount);with looking at how the GetKey function works
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think what you were looking for was
FixedSizeArray2<Pointer<RgbKey>>. But in this case, with a dynamic sized array, it probably won’t help much.
Originally tried this with a FixedSizeArray1, but it throws a IndexOutOfRangeException beyond the first element.
Could do
[FieldOffset(0x4)] public RgbKey* KeyPointer; public Span<RgbKey> Keys => new Span(KeyPointer, KeyCount);with looking at how the
GetKeyfunction works
There isn't a pointer here, it's an inline array with a dynamic size.
FFXIVClientStructs/FFXIV/Client/Graphics/Vfx/VfxResourceHandle.cs
Outdated
Show resolved
Hide resolved
| [FieldOffset(0), CExporterUnion("Value")] public ulong Value; | ||
| [FieldOffset(0), CExporterUnion("Value")] public uint Id; | ||
| [FieldOffset(4), CExporterUnion("Value")] public uint Index; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will export the unions as
union Value {
uint64_t Value;
uint32_t Id;
uint32_t Index;
}all which are at field offset 0
apricot is a nice fruit